
<%@ page import="com.afb.HHPredJob" %>
<%@ page import="com.afb.Process" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'HHPredJob.label', default: 'HHPredJob')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>


<script type="text/javascript" src="${createLinkTo(dir:'js',file:'jquery-1.4.3.js')}">
</script>
<script type="text/javascript">
$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});
</script>


    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
<!--
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
-->
            <span class="menuButton"><g:link class="show" action="show" id="${params.jobId}">HHPredJob</g:link></span>
<!--
            <span class="menuButton"><g:link class="show" action="show" id="${params.jobId}">teste</g:link></span>
            <span class="menuButton"><g:link class="show" action="show" id="3">teste</g:link></span>
-->

<!--
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
-->
        </div>
        <div class="body">




            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>

<div class="container">

	<h1>${fieldValue(bean: processInstance, field: "name")}</h1>
        <b>Status</b> : ${fieldValue(bean: processInstance, field: "status")}
    <g:link controller="HHPredJob" action="retry" id="${processInstance.id}">Retry</g:link>
<!--
<g:if test="${processInstance.status=='error'}">
    <g:link controller="HHPredJob" action="retry" id="${processInstance.id}">Retry</g:link>
</g:if>
-->

        <br/>

<br/>
    <ul class="tabs">
        <li><a href="#tab1">Input</a></li>
        <g:if test="${processInstance.output != null}">
          <li><a href="#tab2">Output</a></li>
        </g:if>
        <g:else>
        </g:else>


        
    </ul>
    <div class="tab_container">
        <div id="tab1" class="tab_content">
<!--
            <h2>Job</h2>
-->
<br/>

            <div class="dialog">
                <table>
                    <tbody>
                        <tr class="prop">

<!--
                            <td valign="top" class="value">${processInstance.input}</td>

                            <td valign="top" class="value">${fieldValue(bean: processInstance, field: "input")}</td>
-->

<td valign="top" class="value"><textArea id="styled" name="proteinSequences" cols="100" rows="10" value="" readonly>${fieldValue(bean: processInstance, field: "input")}</textArea></td>

                        </tr>

                    </tbody>
               </table>
            </div>

        </div>





        <div id="tab2" class="tab_content">
<!--
            <h2>Job</h2>
-->
<br/>

            <div class="dialog">
                <table>
                    <tbody>
                        <tr class="prop">
<!--
                            <td valign="top" class="value">${processInstance.input}</td>

                            <td valign="top" class="value">${fieldValue(bean: processInstance, field: "output")}</td>
-->

<td valign="top" class="value"><textArea id="styled" name="proteinSequences" cols="100%" rows="10" value="" readonly>${fieldValue(bean: processInstance, field: "output")}</textArea></td>

                        </tr>

                    </tbody>
               </table>
            </div>

        </div>


        







    </div>
</div>



          

        </div>

    </body>
</html>
